package com.tiancikeji.zaoke.app.model.zone;

import java.util.Date;
import java.util.List;

import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;

public class Zone {
	
	public static final int TYPE_DISTRICT = 1;
	
	public static final int TYPE_MERCHANT = 2;
	
	public static final int TYPE_PICK = 3;
	
	public static final int STATE_ACTIVE = 0;
	
	public static final int STATE_INACTIVE = 1;

	private long id;
	
	private String name;
	
	private int type;
	
	private long parentId;
	
	private int state;
	
	private int sequence;
	
	private String pickStartTime;
	
	private String pickEndTime;
	
	private long addUserId;
	
	private Date addTime;
	
	private long lastmodUserId;
	
	private Date lastmodTime;
	
	private List<Zone> subZones;
	
	private boolean flag;

	public long getId() {
		return id;
	}

	public void setId(long id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public int getType() {
		return type;
	}

	public void setType(int type) {
		this.type = type;
	}

	public long getParentId() {
		return parentId;
	}

	public void setParentId(long parentId) {
		this.parentId = parentId;
	}

	public int getState() {
		return state;
	}

	public void setState(int state) {
		this.state = state;
	}

	public int getSequence() {
		return sequence;
	}

	public void setSequence(int sequence) {
		this.sequence = sequence;
	}

	public String getPickStartTime() {
		return pickStartTime;
	}

	public void setPickStartTime(String pickStartTime) {
		this.pickStartTime = pickStartTime;
	}

	public String getPickEndTime() {
		return pickEndTime;
	}

	public void setPickEndTime(String pickEndTime) {
		this.pickEndTime = pickEndTime;
	}

	public long getAddUserId() {
		return addUserId;
	}

	public void setAddUserId(long addUserId) {
		this.addUserId = addUserId;
	}

	public Date getAddTime() {
		return addTime;
	}

	public void setAddTime(Date addTime) {
		this.addTime = addTime;
	}

	public long getLastmodUserId() {
		return lastmodUserId;
	}

	public void setLastmodUserId(long lastmodUserId) {
		this.lastmodUserId = lastmodUserId;
	}

	public Date getLastmodTime() {
		return lastmodTime;
	}

	public void setLastmodTime(Date lastmodTime) {
		this.lastmodTime = lastmodTime;
	}

	@Override
	public boolean equals(Object obj) {
		return EqualsBuilder.reflectionEquals(this, obj);
	}

	@Override
	public int hashCode() {
		return HashCodeBuilder.reflectionHashCode(this);
	}

	@Override
	public String toString() {
		return ToStringBuilder.reflectionToString(this);
	}

	public List<Zone> getSubZones() {
		return subZones;
	}

	public void setSubZones(List<Zone> subZones) {
		this.subZones = subZones;
	}

	public boolean isFlag() {
		return flag;
	}

	public void setFlag(boolean flag) {
		this.flag = flag;
	}
}
